/*
 * @Description: 电子文件挂接弹窗
 * @Author: Rfan
 * @Date: 2022-02-28 14:38:33
 * @LastEditTime: 2022-05-25 08:44:58
 */
import React from 'react';
import { Modal } from 'antd';
import PDFViewer from '@/components/Preview/components/PDFViewer';
import VideoViewer from '@/components/Preview/components/VideoViewer';

const PdfDialog = (props: any) => {
  const { visible, onCancel } = props;

  const handleOk = () => {};

  const handelCancel = () => {
    onCancel(false);
  };

  const videoSrc =
    'http://192.168.0.136:5500/build/%E3%80%8A%E8%8A%B1%E5%A5%BD%E6%9C%88%E5%9C%86%E3%80%8B.mp4';

  return (
    <Modal
      title="PDF"
      visible={visible}
      width={800}
      footer={null}
      destroyOnClose
      onOk={handleOk}
      onCancel={handelCancel}
    >
      <VideoViewer type="audio/mpeg" src={videoSrc} />
      <PDFViewer title="PDF" src="http://192.168.0.136:5500/build/TypeScript.pdf" />
    </Modal>
  );
};

export default PdfDialog;
